/**
 * 后台首页统计相关接口
 */

// 引入Router
const Router = require("express");
const { indexInfo } = require("../../../business/admin/indexDis");
const router = new Router();


// 引入业务逻辑
const indexDis = require("../../../business/admin/indexDis");

// 首页 统计
router.get("/index", (req, res) => {
  indexDis.indexInfo(req, res);
})

// 轮播图、客服二维码、设计图
router.get("/img_info", (req, res) => {
  indexDis.imgInfo(req, res);
})

// 轮播图新增
router.post("/add_img", (req, res) => {
  indexDis.addImg(req, res);
})

// 删除轮播图
// router.post("/swiper/del", (req, res) => {
//   indexDis.delSwiper(req, res);
// })

// 删除轮播图/设计图
router.post("/img/del", (req, res) => {
  indexDis.delImg(req, res); 
})

module.exports = () => {
  return router;
}